Kludge around probably TZ issue that I introduced in hiketech.
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 21 Aug 2013 19:46:49 +0000 (19:46 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 21 Aug 2013 19:46:49 +0000 (19:46 +0000)
gpsbabel/hiketech.cc

index d1be6f2275ec3888944985f7810731d63ee88fd7..d3dbbd53e44528051344b34eec30486b54693372 100644 (file)
@@ -130,7 +130,17 @@ hiketech_trk_tlr(const route_head* rte)
 static QString
 hiketech_format_time(const QDateTime& t)
 {
+  // FIXME: Find out why these two blocks of code aren't equivalent.
+  // it produces times that are 12 hours too late.  Double TZ bump?
+  // for now, just go back to the way we've done it for a decade.  -- robert
+#if 0
   return t.toString("yyyy-MM-dd hh:mm:ss");
+#else
+  char tbuf[80];
+  time_t tm = t.toTime_t();
+  strftime(tbuf, sizeof(tbuf), "%Y-%m-%d %I:%M:%S", gmtime(&tm));
+  return QString(tbuf);
+#endif
 }
 
 static void